<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>合约交友推荐 - 安全社交平台</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    
    <style>
        :root {
            --primary-color: #2563eb;
            --secondary-color: #4f46e5;
            --success-color: #10b981;
            --warning-color: #f59e0b;
            --danger-color: #ef4444;
            --light-bg: #f8fafc;
            --dark-text: #1e293b;
            --light-text: #64748b;
            --border-color: #e2e8f0;
        }
        
        body {
            font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
            background-color: var(--light-bg);
            color: var(--dark-text);
            line-height: 1.6;
        }
        
        .navbar {
            background-color: var(--primary-color);
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }
        
        .badge-contract {
            background-color: rgba(79, 70, 229, 0.1);
            color: var(--secondary-color);
            border: 1px solid var(--secondary-color);
        }
        
        .card {
            border: 1px solid var(--border-color);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
            transition: all 0.3s ease;
            height: 100%;
            display: flex;
            flex-direction: column;
        }
        
        .card:hover {
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            transform: translateY(-3px);
        }
        
        .stat-item {
            display: flex;
            align-items: center;
            gap: 6px;
            color: var(--light-text);
            font-size: 0.875rem;
        }
        
        .stat-item i {
            color: var(--primary-color);
        }
        
        .author-info {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .author-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .image-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 4px;
            height: 100%;
        }
        
        .image-grid img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .image-grid-3 {
            grid-template-columns: 2fr 1fr;
            grid-template-rows: 1fr 1fr;
        }
        
        .image-grid-3 img:first-child {
            grid-column: 1;
            grid-row: 1 / 3;
        }
        
        .image-count-overlay {
            position: absolute;
            bottom: 8px;
            right: 8px;
            background-color: rgba(0, 0, 0, 0.6);
            color: white;
            border-radius: 4px;
            padding: 2px 6px;
            font-size: 0.75rem;
        }
        
        .action-buttons {
            display: flex;
            gap: 10px;
        }
        
        .action-btn {
            background: none;
            border: none;
            color: var(--light-text);
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 0.875rem;
        }
        
        .action-btn:hover {
            color: var(--primary-color);
        }
        
        .action-btn.liked {
            color: var(--danger-color);
        }
        
        .action-btn.saved {
            color: var(--primary-color);
        }
        
        .section-title {
            position: relative;
            display: inline-block;
            margin-bottom: 1.5rem;
            font-weight: 600;
            padding-bottom: 8px;
        }
        
        .section-title::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: 0;
            width: 40px;
            height: 3px;
            background-color: var(--primary-color);
        }
        
        .filter-bar {
            background-color: white;
            border-radius: 8px;
            padding: 1rem;
            margin-bottom: 2rem;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }
        
        .tag {
            display: inline-block;
            background-color: rgba(37, 99, 235, 0.1);
            color: var(--primary-color);
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.875rem;
            margin-right: 0.5rem;
            margin-bottom: 0.5rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .tag:hover, .tag.active {
            background-color: var(--primary-color);
            color: white;
        }
        
        .card-image-container {
            position: relative;
            overflow: hidden;
        }
        
        .card-image-container.single-image {
            height: 200px;
        }
        
        .card-image-container.multi-image {
            height: 160px;
        }
        
        .card-image-container.no-image {
            height: 120px;
            background-color: #f1f5f9;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--light-text);
        }
        
        .list-view-item {
            display: flex;
            background-color: white;
            border-radius: 8px;
            overflow: hidden;
            margin-bottom: 1rem;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            transition: all 0.3s ease;
        }
        
        .list-view-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
        }
        
        .list-image-container {
            width: 200px;
            flex-shrink: 0;
            position: relative;
        }
        
        .list-content {
            flex-grow: 1;
            padding: 1rem;
        }
        
        .grid-view .col {
            margin-bottom: 1.5rem;
        }
        
        .featured-badge {
            position: absolute;
            top: 8px;
            left: 8px;
            background-color: var(--warning-color);
            color: white;
            border-radius: 4px;
            padding: 2px 8px;
            font-size: 0.75rem;
            font-weight: 600;
        }
        
        .view-toggle {
            display: flex;
            gap: 10px;
            margin-left: auto;
        }
        
        .view-btn {
            background-color: white;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            padding: 6px 12px;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .view-btn.active {
            background-color: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }
        
        .contract-terms {
            background-color: rgba(79, 70, 229, 0.05);
            border-left: 3px solid var(--secondary-color);
            padding: 8px 12px;
            margin: 0.75rem 0;
            font-size: 0.875rem;
            border-radius: 0 4px 4px 0;
        }
        
        @media (max-width: 992px) {
            .list-image-container {
                width: 160px;
            }
        }
        
        @media (max-width: 768px) {
            .list-view-item {
                flex-direction: column;
            }
            
            .list-image-container {
                width: 100%;
                height: 160px;
            }
            
            .action-buttons {
                flex-wrap: wrap;
            }
            
            .filter-bar .row {
                flex-direction: column;
                gap: 1rem;
            }
            
            .view-toggle {
                margin-left: 0;
                margin-top: 1rem;
            }
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar navbar-expand-lg navbar-dark">
        <div class="container">
            <a class="navbar-brand d-flex align-items-center gap-2" href="#">
                <i class="fas fa-shield-alt"></i>
                <span>安全社交</span>
            </a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav me-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="#">首页</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">担保交友</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link active" href="#">合约交友</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">兴趣群组</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">安全指南</a>
                    </li>
                </ul>
                <div class="d-flex align-items-center gap-3">
                    <div class="position-relative">
                        <button class="btn btn-outline-light">
                            <i class="fas fa-bell"></i>
                        </button>
                        <span class="position-absolute top-0 right-0 translate-middle badge rounded-circle bg-danger">2</span>
                    </div>
                    <div class="dropdown">
                        <button class="btn btn-secondary dropdown-toggle rounded-circle" type="button" data-bs-toggle="dropdown">
                            <img src="https://picsum.photos/id/64/40/40" alt="用户头像" width="36" height="36" class="rounded-circle">
                        </button>
                        <ul class="dropdown-menu dropdown-menu-end">
                            <li><a class="dropdown-item" href="#">个人中心</a></li>
                            <li><a class="dropdown-item" href="#">我的合约</a></li>
                            <li><a class="dropdown-item" href="#">消息通知</a></li>
                            <li><hr class="dropdown-divider"></li>
                            <li><a class="dropdown-item" href="#">退出登录</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </nav>

    <!-- 主要内容 -->
    <div class="container py-6">
        <!-- 页面标题 -->
        <div class="mb-6">
            <h1>合约交友推荐</h1>
            <p class="text-light-text">基于兴趣和需求的安全交友合约，建立可靠的社交关系</p>
        </div>
        
        <!-- 筛选栏 -->
        <div class="filter-bar">
            <div class="row align-items-center">
                <div class="col-md-4">
                    <div class="input-group">
                        <input type="text" class="form-control" placeholder="搜索合约交友...">
                        <button class="btn btn-primary" type="button">
                            <i class="fas fa-search"></i>
                        </button>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="d-flex gap-2">
                        <select class="form-select">
                            <option>所有类别</option>
                            <option>兴趣爱好</option>
                            <option>学习交流</option>
                            <option>户外活动</option>
                            <option>职场社交</option>
                            <option>文化艺术</option>
                        </select>
                        <select class="form-select">
                            <option>最新发布</option>
                            <option>最多浏览</option>
                            <option>最多参与</option>
                            <option>即将到期</option>
                        </select>
                    </div>
                </div>
                <div class="col-md-4 d-flex align-items-center">
                    <div class="me-4">
                        <span class="tag active">全部</span>
                        <span class="tag">有图</span>
                        <span class="tag">无图</span>
                    </div>
                    <div class="view-toggle">
                        <button class="view-btn active" id="gridViewBtn" title="网格视图">
                            <i class="fas fa-th"></i>
                        </button>
                        <button class="view-btn" id="listViewBtn" title="列表视图">
                            <i class="fas fa-list"></i>
                        </button>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 特色合约 -->
        <section class="mb-10">
            <h2 class="section-title">特色合约交友</h2>
            <div class="row">
                <!-- 特色合约1 - 带单张图片 -->
                <div class="col-lg-6 mb-4">
                    <div class="card">
                        <div class="card-image-container single-image">
                            <img src="https://picsum.photos/id/325/800/400" alt="周末读书会合约" class="w-100 h-100 object-cover">
                            <span class="featured-badge">精选</span>
                        </div>
                        <div class="card-body flex-grow-1">
                            <div class="d-flex justify-content-between align-items-start mb-2">
                                <h5 class="card-title mb-0">每月读书会合约 - 经典文学爱好者</h5>
                                <span class="badge badge-contract">兴趣爱好</span>
                            </div>
                            
                            <div class="contract-terms">
                                <strong>合约内容：</strong>每月共读1本经典文学，线下讨论1次，持续3个月
                            </div>
                            
                            <p class="card-text text-sm text-light-text mt-2 line-clamp-2">
                                寻找热爱经典文学的朋友，一起阅读、讨论、分享感悟。我们将每月选择一本经典书籍，线上分享笔记，月底线下聚会讨论。
                            </p>
                            
                            <div class="author-info mt-3 mb-3">
                                <img src="https://picsum.photos/id/1027/36/36" alt="张雨晴的头像" class="author-avatar">
                                <div>
                                    <span class="font-medium">张雨晴</span>
                                    <div class="text-xs text-light-text">文学编辑 · 已认证</div>
                                </div>
                            </div>
                        </div>
                        <div class="card-footer bg-transparent border-top d-flex justify-content-between align-items-center">
                            <div class="d-flex gap-3">
                                <div class="stat-item">
                                    <i class="far fa-eye"></i>
                                    <span>528</span>
                                </div>
                                <div class="stat-item">
                                    <i class="far fa-comment"></i>
                                    <span>42</span>
                                </div>
                                <div class="stat-item">
                                    <i class="far fa-bookmark"></i>
                                    <span>89</span>
                                </div>
                            </div>
                            <div class="action-buttons">
                                <button class="action-btn">
                                    <i class="far fa-heart"></i>
                                    <span>124</span>
                                </button>
                                <button class="btn btn-sm btn-primary">
                                    查看详情
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 特色合约2 - 带多张图片 -->
                <div class="col-lg-6 mb-4">
                    <div class="card">
                        <div class="card-image-container multi-image position-relative">
                            <div class="image-grid image-grid-3">
                                <img src="https://picsum.photos/id/1060/400/400" alt="摄影活动照片1">
                                <img src="https://picsum.photos/id/1062/200/200" alt="摄影活动照片2">
                                <img src="https://picsum.photos/id/1063/200/200" alt="摄影活动照片3">
                            </div>
                            <span class="image-count-overlay">+5</span>
                            <span class="featured-badge">热门</span>
                        </div>
                        <div class="card-body flex-grow-1">
                            <div class="d-flex justify-content-between align-items-start mb-2">
                                <h5 class="card-title mb-0">城市摄影采风合约 - 每周一次</h5>
                                <span class="badge badge-contract">户外活动</span>
                            </div>
                            
                            <div class="contract-terms">
                                <strong>合约内容：</strong>每周六一起城市采风，分享摄影技巧，持续2个月
                            </div>
                            
                            <p class="card-text text-sm text-light-text mt-2 line-clamp-2">
                                寻找摄影爱好者，一起探索城市角落，记录美好瞬间。无论你是新手还是有经验的摄影师，都欢迎加入交流学习。
                            </p>
                            
                            <div class="author-info mt-3 mb-3">
                                <img src="https://picsum.photos/id/1012/36/36" alt="李明的头像" class="author-avatar">
                                <div>
                                    <span class="font-medium">李明</span>
                                    <div class="text-xs text-light-text">摄影师 · 已认证</div>
                                </div>
                            </div>
                        </div>
                        <div class="card-footer bg-transparent border-top d-flex justify-content-between align-items-center">
                            <div class="d-flex gap-3">
                                <div class="stat-item">
                                    <i class="far fa-eye"></i>
                                    <span>876</span>
                                </div>
                                <div class="stat-item">
                                    <i class="far fa-comment"></i>
                                    <span>103</span>
                                </div>
                                <div class="stat-item">
                                    <i class="far fa-bookmark"></i>
                                    <span>215</span>
                                </div>
                            </div>
                            <div class="action-buttons">
                                <button class="action-btn liked">
                                    <i class="fas fa-heart"></i>
                                    <span>342</span>
                                </button>
                                <button class="btn btn-sm btn-primary">
                                    查看详情
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        
        <!-- 网格视图合约列表 -->
        <section class="mb-10 grid-view" id="gridView">
            <h2 class="section-title">最新合约交友</h2>
            <div class="row">
                <!-- 合约1 - 无图片 -->
                <div class="col-md-6 col-lg-4 col-xl-3">
                    <div class="card">
                        <div class="card-image-container no-image">
                            <i class="fas fa-language fa-2x"></i>
                        </div>
                        <div class="card-body flex-grow-1">
                            <div class="d-flex justify-content-between align-items-start mb-2">
                                <h5 class="card-title mb-0 fs-6">英语学习伙伴合约 - 每日练习</h5>
                                <span class="badge badge-contract">学习交流</span>
                            </div>
                            
                            <div class="contract-terms">
                                <strong>合约：</strong>每日英语对话30分钟，持续1个月
                            </div>
                            
                            <p class="card-text text-sm text-light-text mt-2 line-clamp-2">
                                寻找英语学习伙伴，每天固定时间进行口语练习，互相纠正发音和语法。
                            </p>
                            
                            <div class="author-info mt-3 mb-3">
                                <img src="https://picsum.photos/id/1025/36/36" alt="王文静的头像" class="author-avatar">
                                <div>
                                    <span class="font-medium text-sm">王文静</span>
                                    <div class="text-xs text-light-text">英语教师</div>
                                </div>
                            </div>
                        </div>
                        <div class="card-footer bg-transparent border-top d-flex justify-content-between align-items-center">
                            <div class="d-flex gap-2">
                                <div class="stat-item">
                                    <i class="far fa-eye"></i>
                                    <span>342</span>
                                </div>
                                <div class="stat-item">
                                    <i class="far fa-comment"></i>
                                    <span>28</span>
                                </div>
                            </div>
                            <div class="action-buttons">
                                <button class="action-btn">
                                    <i class="far fa-heart"></i>
                                    <span>76</span>
                                </button>
                                <button class="action-btn">
                                    <i class="far fa-bookmark"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 合约2 - 单张图片 -->
                <div class="col-md-6 col-lg-4 col-xl-3">
                    <div class="card">
                        <div class="card-image-container single-image">
                            <img src="https://picsum.photos/id/292/400/300" alt="健身伙伴合约" class="w-100 h-100 object-cover">
                        </div>
                        <div class="card-body flex-grow-1">
                            <div class="d-flex justify-content-between align-items-start mb-2">
                                <h5 class="card-title mb-0 fs-6">健身伙伴合约 - 每周3次</h5>
                                <span class="badge badge-contract">户外活动</span>
                            </div>
                            
                            <div class="contract-terms">
                                <strong>合约：</strong>每周3次健身房锻炼，互相监督，持续2个月
                            </div>
                            
                            <p class="card-text text-sm text-light-text mt-2 line-clamp-2">
                                寻找健身伙伴一起锻炼，互相鼓励，共同进步。主要进行力量训练和有氧运动。
                            </p>
                            
                            <div class="author-info mt-3 mb-3">
                                <img src="https://picsum.photos/id/1074/36/36" alt="刘阳的头像" class="author-avatar">
                                <div>
                                    <span class="font-medium text-sm">刘阳</span>
                                    <div class="text-xs text-light-text">健身教练</div>
                                </div>
                            </div>
                        </div>
                        <div class="card-footer bg-transparent border-top d-flex justify-content-between align-items-center">
                            <div class="d-flex gap-2">
                                <div class="stat-item">
                                    <i class="far fa-eye"></i>
                                    <span>456</span>
                                </div>
                                <div class="stat-item">
                                    <i class="far fa-comment"></i>
                                    <span>37</span>
                                </div>
                            </div>
                            <div class="action-buttons">
                                <button class="action-btn liked">
                                    <i class="fas fa-heart"></i>
                                    <span>128</span>
                                </button>
                                <button class="action-btn saved">
                                    <i class="fas fa-bookmark"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 合约3 - 两张图片 -->
                <div class="col-md-6 col-lg-4 col-xl-3">
                    <div class="card">
                        <div class="card-image-container multi-image">
                            <div class="image-grid">
                                <img src="https://picsum.photos/id/431/200/200" alt="厨艺交流照片1">
                                <img src="https://picsum.photos/id/292/200/200" alt="厨艺交流照片2">
                            </div>
                        </div>
                        <div class="card-body flex-grow-1">
                            <div class="d-flex justify-content-between align-items-start mb-2">
                                <h5 class="card-title mb-0 fs-6">厨艺交流合约 - 每月一次聚餐</h5>
                                <span class="badge badge-contract">兴趣爱好</span>
                            </div>
                            
                            <div class="contract-terms">
                                <strong>合约：</strong>每月轮流举办家庭聚餐，分享厨艺，持续3个月
                            </div>
                            
                            <p class="card-text text-sm text-light-text mt-2 line-clamp-2">
                                寻找美食爱好者，一起研究烹饪技巧，每月轮流到各家举办聚餐，分享自己的拿手菜。
                            </p>
                            
                            <div class="author-info mt-3 mb-3">
                                <img src="https://picsum.photos/id/1066/36/36" alt="陈小明的头像" class="author-avatar">
                                <div>
                                    <span class="font-medium text-sm">陈小明</span>
                                    <div class="text-xs text-light-text">美食博主</div>
                                </div>
                            </div>
                        </div>
                        <div class="card-footer bg-transparent border-top d-flex justify-content-between align-items-center">
                            <div class="d-flex gap-2">
                                <div class="stat-item">
                                    <i class="far fa-eye"></i>
                                    <span>621</span>
                                </div>
                                <div class="stat-item">
                                    <i class="far fa-comment"></i>
                                    <span>53</span>
                                </div>
                            </div>
                            <div class="action-buttons">
                                <button class="action-btn">
                                    <i class="far fa-heart"></i>
                                    <span>187</span>
                                </button>
                                <button class="action-btn">
                                    <i class="far fa-bookmark"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 合约4 - 无图片 -->
                <div class="col-md-6 col-lg-4 col-xl-3">
                    <div class="card">
                        <div class="card-image-container no-image">
                            <i class="fas fa-briefcase fa-2x"></i>
                        </div>
                        <div class="card-body flex-grow-1">
                            <div class="d-flex justify-content-between align-items-start mb-2">
                                <h5 class="card-title mb-0 fs-6">创业者交流合约 - 每周分享会</h5>
                                <span class="badge badge-contract">职场社交</span>
                            </div>
                            
                            <div class="contract-terms">
                                <strong>合约：</strong>每周线上分享创业经验，每月线下聚会1次
                            </div>
                            
                            <p class="card-text text-sm text-light-text mt-2 line-clamp-2">
                                寻找创业者或准备创业的朋友，互相交流经验、资源共享、解决问题，共同成长。
                            </p>
                            
                            <div class="author-info mt-3 mb-3">
                                <img src="https://picsum.photos/id/1062/36/36" alt="赵自然的头像" class="author-avatar">
                                <div>
                                    <span class="font-medium text-sm">赵自然</span>
                                    <div class="text-xs text-light-text">连续创业者</div>
                                </div>
                            </div>
                        </div>
                        <div class="card-footer bg-transparent border-top d-flex justify-content-between align-items-center">
                            <div class="d-flex gap-2">
                                <div class="stat-item">
                                    <i class="far fa-eye"></i>
                                    <span>289</span>
                                </div>
                                <div class="stat-item">
                                    <i class="far fa-comment"></i>
                                    <span>41</span>
                                </div>
                            </div>
                            <div class="action-buttons">
                                <button class="action-btn">
                                    <i class="far fa-heart"></i>
                                    <span>93</span>
                                </button>
                                <button class="action-btn saved">
                                    <i class="fas fa-bookmark"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 合约5 - 三张图片 -->
                <div class="col-md-6 col-lg-4 col-xl-3">
                    <div class="card">
                        <div class="card-image-container multi-image position-relative">
                            <div class="image-grid image-grid-3">
                                <img src="https://picsum.photos/id/301/400/400" alt="旅行照片1">
                                <img src="https://picsum.photos/id/302/200/200" alt="旅行照片2">
                                <img src="https://picsum.photos/id/303/200/200" alt="旅行照片3">
                            </div>
                            <span class="image-count-overlay">+3</span>
                        </div>
                        <div class="card-body flex-grow-1">
                            <div class="d-flex justify-content-between align-items-start mb-2">
                                <h5 class="card-title mb-0 fs-6">周末短途旅行合约 - 每月一次</h5>
                                <span class="badge badge-contract">户外活动</span>
                            </div>
                            
                            <div class="contract-terms">
                                <strong>合约：</strong>每月一次周边短途旅行，费用AA，持续6个月
                            </div>
                            
                            <p class="card-text text-sm text-light-text mt-2 line-clamp-2">
                                寻找喜欢旅行的朋友，每月探索一个周边景点，感受不同地方的风土人情和自然景观。
                            </p>
                            
                            <div class="author-info mt-3 mb-3">
                                <img src="https://picsum.photos/id/1079/36/36" alt="孙浩然的头像" class="author-avatar">
                                <div>
                                    <span class="font-medium text-sm">孙浩然</span>
                                    <div class="text-xs text-light-text">旅行爱好者</div>
                                </div>
                            </div>
                        </div>
                        <div class="card-footer bg-transparent border-top d-flex justify-content-between align-items-center">
                            <div class="d-flex gap-2">
                                <div class="stat-item">
                                    <i class="far fa-eye"></i>
                                    <span>753</span>
                                </div>
                                <div class="stat-item">
                                    <i class="far fa-comment"></i>
                                    <span>89</span>
                                </div>
                            </div>
                            <div class="action-buttons">
                                <button class="action-btn liked">
                                    <i class="fas fa-heart"></i>
                                    <span>245</span>
                                </button>
                                <button class="action-btn">
                                    <i class="far fa-bookmark"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 合约6 - 单张图片 -->
                <div class="col-md-6 col-lg-4 col-xl-3">
                    <div class="card">
                        <div class="card-image-container single-image">
                            <img src="https://picsum.photos/id/169/400/300" alt="绘画学习合约" class="w-100 h-100 object-cover">
                        </div>
                        <div class="card-body flex-grow-1">
                            <div class="d-flex justify-content-between align-items-start mb-2">
                                <h5 class="card-title mb-0 fs-6">绘画学习合约 - 每周一次课程</h5>
                                <span class="badge badge-contract">文化艺术</span>
                            </div>
                            
                            <div class="contract-terms">
                                <strong>合约：</strong>每周日下午绘画练习，互相指导，持续3个月
                            </div>
                            
                            <p class="card-text text-sm text-light-text mt-2 line-clamp-2">
                                寻找绘画爱好者，一起学习绘画技巧，从基础开始，每周练习一个主题，共同进步。
                            </p>
                            
                            <div class="author-info mt-3 mb-3">
                                <img src="https://picsum.photos/id/1083/36/36" alt="林小美头像" class="author-avatar">
                                <div>
                                    <span class="font-medium text-sm">林小美</span>
                                    <div class="text-xs text-light-text">美术老师</div>
                                </div>
                            </div>
                        </div>
                        <div class="card-footer bg-transparent border-top d-flex justify-content-between align-items-center">
                            <div class="d-flex gap-2">
                                <div class="stat-item">
                                    <i class="far fa-eye"></i>
                                    <span>321</span>
                                </div>
                                <div class="stat-item">
                                    <i class="far fa-comment"></i>
                                    <span>25</span>
                                </div>
                            </div>
                            <div class="action-buttons">
                                <button class="action-btn">
                                    <i class="far fa-heart"></i>
                                    <span>68</span>
                                </button>
                                <button class="action-btn">
                                    <i class="far fa-bookmark"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        
        <!-- 列表视图合约列表 -->
        <section class="mb-10 d-none list-view" id="listView">
            <h2 class="section-title">最新合约交友</h2>
            
            <!-- 合约1 - 无图片 -->
            <div class="list-view-item">
                <div class="list-image-container no-image d-flex align-items-center justify-content-center">
                    <i class="fas fa-language fa-2x text-light-text"></i>
                </div>
                <div class="list-content">
                    <div class="d-flex justify-content-between align-items-start">
                        <div>
                            <h5 class="mb-1">英语学习伙伴合约 - 每日练习</h5>
                            <span class="badge badge-contract mb-2">学习交流</span>
                        </div>
                        <div class="action-buttons">
                            <button class="action-btn">
                                <i class="far fa-heart"></i>
                                <span>76</span>
                            </button>
                            <button class="action-btn">
                                <i class="far fa-bookmark"></i>
                            </button>
                            <button class="btn btn-sm btn-primary">
                                查看详情
                            </button>
                        </div>
                    </div>
                    
                    <div class="contract-terms mb-2">
                        <strong>合约内容：</strong>每日英语对话30分钟，持续1个月
                    </div>
                    
                    <p class="text-sm text-light-text mb-3 line-clamp-1">
                        寻找英语学习伙伴，每天固定时间进行口语练习，互相纠正发音和语法。
                    </p>
                    
                    <div class="d-flex justify-content-between align-items-center">
                        <div class="d-flex items-center gap-4">
                            <div class="author-info">
                                <img src="https://picsum.photos/id/1025/36/36" alt="王文静的头像" class="author-avatar">
                                <span class="font-medium text-sm">王文静</span>
                            </div>
                            <div class="d-flex gap-3">
                                <div class="stat-item">
                                    <i class="far fa-eye"></i>
                                    <span>342</span>
                                </div>
                                <div class="stat-item">
                                    <i class="far fa-comment"></i>
                                    <span>28</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 合约2 - 单张图片 -->
            <div class="list-view-item">
                <div class="list-image-container">
                    <img src="https://picsum.photos/id/292/400/400" alt="健身伙伴合约" class="w-100 h-100 object-cover">
                </div>
                <div class="list-content">
                    <div class="d-flex justify-content-between align-items-start">
                        <div>
                            <h5 class="mb-1">健身伙伴合约 - 每周3次</h5>
                            <span class="badge badge-contract mb-2">户外活动</span>
                        </div>
                        <div class="action-buttons">
                            <button class="action-btn liked">
                                <i class="fas fa-heart"></i>
                                <span>128</span>
                            </button>
                            <button class="action-btn saved">
                                <i class="fas fa-bookmark"></i>
                            </button>
                            <button class="btn btn-sm btn-primary">
                                查看详情
                            </button>
                        </div>
                    </div>
                    
                    <div class="contract-terms mb-2">
                        <strong>合约内容：</strong>每周3次健身房锻炼，互相监督，持续2个月
                    </div>
                    
                    <p class="text-sm text-light-text mb-3 line-clamp-1">
                        寻找健身伙伴一起锻炼，互相鼓励，共同进步。主要进行力量训练和有氧运动。
                    </p>
                    
                    <div class="d-flex justify-content-between align-items-center">
                        <div class="d-flex items-center gap-4">
                            <div class="author-info">
                                <img src="https://picsum.photos/id/1074/36/36" alt="刘阳的头像" class="author-avatar">
                                <span class="font-medium text-sm">刘阳</span>
                            </div>
                            <div class="d-flex gap-3">
                                <div class="stat-item">
                                    <i class="far fa-eye"></i>
                                    <span>456</span>
                                </div>
                                <div class="stat-item">
                                    <i class="far fa-comment"></i>
                                    <span>37</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 合约3 - 多张图片 -->
            <div class="list-view-item">
                <div class="list-image-container">
                    <div class="image-grid image-grid-3 h-100">
                        <img src="https://picsum.photos/id/301/400/400" alt="旅行照片1">
                        <img src="https://picsum.photos/id/302/200/200" alt="旅行照片2">
                        <img src="https://picsum.photos/id/303/200/200" alt="旅行照片3">
                    </div>
                    <span class="image-count-overlay">+3</span>
                </div>
                <div class="list-content">
                    <div class="d-flex justify-content-between align-items-start">
                        <div>
                            <h5 class="mb-1">周末短途旅行合约 - 每月一次</h5>
                            <span class="badge badge-contract mb-2">户外活动</span>
                        </div>
                        <div class="action-buttons">
                            <button class="action-btn liked">
                                <i class="fas fa-heart"></i>
                                <span>245</span>
                            </button>
                            <button class="action-btn">
                                <i class="far fa-bookmark"></i>
                            </button>
                            <button class="btn btn-sm btn-primary">
                                查看详情
                            </button>
                        </div>
                    </div>
                    
                    <div class="contract-terms mb-2">
                        <strong>合约内容：</strong>每月一次周边短途旅行，费用AA，持续6个月
                    </div>
                    
                    <p class="text-sm text-light-text mb-3 line-clamp-1">
                        寻找喜欢旅行的朋友，每月探索一个周边景点，感受不同地方的风土人情和自然景观。
                    </p>
                    
                    <div class="d-flex justify-content-between align-items-center">
                        <div class="d-flex items-center gap-4">
                            <div class="author-info">
                                <img src="https://picsum.photos/id/1079/36/36" alt="孙浩然的头像" class="author-avatar">
                                <span class="font-medium text-sm">孙浩然</span>
                            </div>
                            <div class="d-flex gap-3">
                                <div class="stat-item">
                                    <i class="far fa-eye"></i>
                                    <span>753</span>
                                </div>
                                <div class="stat-item">
                                    <i class="far fa-comment"></i>
                                    <span>89</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 合约4 - 无图片 -->
            <div class="list-view-item">
                <div class="list-image-container no-image d-flex align-items-center justify-content-center">
                    <i class="fas fa-briefcase fa-2x text-light-text"></i>
                </div>
                <div class="list-content">
                    <div class="d-flex justify-content-between align-items-start">
                        <div>
                            <h5 class="mb-1">创业者交流合约 - 每周分享会</h5>
                            <span class="badge badge-contract mb-2">职场社交</span>
                        </div>
                        <div class="action-buttons">
                            <button class="action-btn">
                                <i class="far fa-heart"></i>
                                <span>93</span>
                            </button>
                            <button class="action-btn saved">
                                <i class="fas fa-bookmark"></i>
                            </button>
                            <button class="btn btn-sm btn-primary">
                                查看详情
                            </button>
                        </div>
                    </div>
                    
                    <div class="contract-terms mb-2">
                        <strong>合约内容：</strong>每周线上分享创业经验，每月线下聚会1次
                    </div>
                    
                    <p class="text-sm text-light-text mb-3 line-clamp-1">
                        寻找创业者或准备创业的朋友，互相交流经验、资源共享、解决问题，共同成长。
                    </p>
                    
                    <div class="d-flex justify-content-between align-items-center">
                        <div class="d-flex items-center gap-4">
                            <div class="author-info">
                                <img src="https://picsum.photos/id/1062/36/36" alt="赵自然的头像" class="author-avatar">
                                <span class="font-medium text-sm">赵自然</span>
                            </div>
                            <div class="d-flex gap-3">
                                <div class="stat-item">
                                    <i class="far fa-eye"></i>
                                    <span>289</span>
                                </div>
                                <div class="stat-item">
                                    <i class="far fa-comment"></i>
                                    <span>41</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        
        <!-- 加载更多 -->
        <div class="text-center mb-10">
            <button class="btn btn-outline-primary px-6 py-3">
                <i class="fas fa-sync-alt me-2"></i>加载更多合约
            </button>
        </div>
        
        <!-- 分类推荐 -->
        <section class="mb-10">
            <h2 class="section-title">按类别浏览</h2>
            <div class="row">
                <div class="col-md-4 mb-4">
                    <div class="card h-100 bg-gradient-to-br from-blue-50 to-indigo-50 border-0">
                        <div class="card-body d-flex flex-column items-center justify-content-center text-center p-6">
                            <div class="w-16 h-16 bg-primary-color/10 rounded-full flex items-center justify-content-center mb-4">
                                <i class="fas fa-hiking text-2xl text-primary-color"></i>
                            </div>
                            <h5 class="card-title mb-2">户外活动</h5>
                            <p class="text-light-text mb-4">徒步、旅行、运动等户外相关的合约交友</p>
                            <span class="badge bg-primary-color/10 text-primary-color">128 个合约</span>
                        </div>
                    </div>
                </div>
                <div class="col-md-4 mb-4">
                    <div class="card h-100 bg-gradient-to-br from-green-50 to-teal-50 border-0">
                        <div class="card-body d-flex flex-column items-center justify-content-center text-center p-6">
                            <div class="w-16 h-16 bg-success-color/10 rounded-full flex items-center justify-content-center mb-4">
                                <i class="fas fa-book text-2xl text-success-color"></i>
                            </div>
                            <h5 class="card-title mb-2">学习交流</h5>
                            <p class="text-light-text mb-4">语言学习、技能提升、知识分享的合约交友</p>
                            <span class="badge bg-success-color/10 text-success-color">95 个合约</span>
                        </div>
                    </div>
                </div>
                <div class="col-md-4 mb-4">
                    <div class="card h-100 bg-gradient-to-br from-purple-50 to-pink-50 border-0">
                        <div class="card-body d-flex flex-column items-center justify-content-center text-center p-6">
                            <div class="w-16 h-16 bg-secondary-color/10 rounded-full flex items-center justify-content-center mb-4">
                                <i class="fas fa-palette text-2xl text-secondary-color"></i>
                            </div>
                            <h5 class="card-title mb-2">兴趣爱好</h5>
                            <p class="text-light-text mb-4">音乐、绘画、美食等兴趣相关的合约交友</p>
                            <span class="badge bg-secondary-color/10 text-secondary-color">156 个合约</span>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>

    <!-- 页脚 -->
    <footer class="bg-dark text-white py-8 mt-12">
        <div class="container">
            <div class="row">
                <div class="col-md-4 mb-6">
                    <h5 class="mb-3">安全社交平台</h5>
                    <p class="text-muted">专注于提供安全、可靠的社交环境，所有交友推荐均经过身份认证</p>
                    <div class="d-flex gap-3 mt-4">
                        <a href="#" class="text-white"><i class="fab fa-weibo fa-lg"></i></a>
                        <a href="#" class="text-white"><i class="fab fa-wechat fa-lg"></i></a>
                        <a href="#" class="text-white"><i class="fab fa-instagram fa-lg"></i></a>
                        <a href="#" class="text-white"><i class="fab fa-twitter fa-lg"></i></a>
                    </div>
                </div>
                <div class="col-md-2 mb-6">
                    <h5 class="mb-3">快速链接</h5>
                    <ul class="list-unstyled">
                        <li><a href="#" class="text-muted">首页</a></li>
                        <li><a href="#" class="text-muted">担保交友</a></li>
                        <li><a href="#" class="text-muted">合约交友</a></li>
                        <li><a href="#" class="text-muted">兴趣群组</a></li>
                    </ul>
                </div>
                <div class="col-md-2 mb-6">
                    <h5 class="mb-3">安全中心</h5>
                    <ul class="list-unstyled">
                        <li><a href="#" class="text-muted">身份认证</a></li>
                        <li><a href="#" class="text-muted">安全指南</a></li>
                        <li><a href="#" class="text-muted">举报中心</a></li>
                        <li><a href="#" class="text-muted">隐私政策</a></li>
                    </ul>
                </div>
                <div class="col-md-4">
                    <h5 class="mb-3">发布合约交友</h5>
                    <p class="text-muted mb-3">创建你的交友合约，找到志同道合的朋友一起实现目标</p>
                    <button class="btn btn-primary w-100">
                        <i class="fas fa-plus me-1"></i> 发布合约
                    </button>
                </div>
            </div>
            <div class="border-top border-gray-700 mt-6 pt-6 text-center text-muted">
                <p>&copy; 2023 安全社交平台 版权所有 | 致力于提供安全的社交环境</p>
            </div>
        </div>
    </footer>

    <!-- Bootstrap 5 JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        // 视图切换功能
        const gridViewBtn = document.getElementById('gridViewBtn');
        const listViewBtn = document.getElementById('listViewBtn');
        const gridView = document.getElementById('gridView');
        const listView = document.getElementById('listView');
        
        gridViewBtn.addEventListener('click', function() {
            gridView.classList.remove('d-none');
            listView.classList.add('d-none');
            gridViewBtn.classList.add('active');
            listViewBtn.classList.remove('active');
        });
        
        listViewBtn.addEventListener('click', function() {
            listView.classList.remove('d-none');
            gridView.classList.add('d-none');
            listViewBtn.classList.add('active');
            gridViewBtn.classList.remove('active');
        });
        
        // 点赞功能
        document.querySelectorAll('.action-btn').forEach(btn => {
            if (btn.querySelector('.fa-heart')) {
                btn.addEventListener('click', function() {
                    const icon = this.querySelector('i');
                    const countSpan = this.querySelector('span');
                    
                    if (icon.classList.contains('far')) {
                        // 点赞
                        icon.classList.remove('far');
                        icon.classList.add('fas');
                        this.classList.add('liked');
                        countSpan.textContent = (parseInt(countSpan.textContent) + 1).toString();
                    } else {
                        // 取消点赞
                        icon.classList.remove('fas');
                        icon.classList.add('far');
                        this.classList.remove('liked');
                        countSpan.textContent = (parseInt(countSpan.textContent) - 1).toString();
                    }
                });
            }
            
            // 收藏功能
            if (btn.querySelector('.fa-bookmark')) {
                btn.addEventListener('click', function() {
                    const icon = this.querySelector('i');
                    
                    if (icon.classList.contains('far')) {
                        // 收藏
                        icon.classList.remove('far');
                        icon.classList.add('fas');
                        this.classList.add('saved');
                    } else {
                        // 取消收藏
                        icon.classList.remove('fas');
                        icon.classList.add('far');
                        this.classList.remove('saved');
                    }
                });
            }
        });
        
        // 标签筛选功能
        document.querySelectorAll('.tag').forEach(tag => {
            tag.addEventListener('click', function() {
                // 移除所有标签的active类
                document.querySelectorAll('.tag').forEach(t => {
                    t.classList.remove('active');
                });
                // 给当前点击的标签添加active类
                this.classList.add('active');
            });
        });
    </script>
</body>
</html>
    
